//
//  RadioListenModel.m
//  NewMusic
//
//  Created by chuxinyu123 on 15/11/25.
//  Copyright © 2015年 Going. All rights reserved.
//

#import "RadioListenModel.h"

@implementation RadioListenModel
- (instancetype)initWithDictionary:(NSDictionary *)dictionary
{
    self = [super init];
    if (self) {
        self.audition_list = [NSMutableArray array];
        [self setValuesForKeysWithDictionary:dictionary];
    }
    return self;
}

+ (RadioListenModel *)radioListenModelWithDictionary:(NSDictionary *)dictionary
{
    RadioListenModel *radioListenModel = [[RadioListenModel alloc] initWithDictionary:dictionary];
    return radioListenModel;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
}

- (void)setValue:(id)value forKey:(NSString *)key
{
    if ([key isEqual:@"audition_list"]) {
        for (NSDictionary *dic in value) {
            SongsAuditionListModel *song = [[SongsAuditionListModel alloc] initWithDictionary:dic];
            [self.audition_list addObject:song];
        }
    }else if ([key isEqual:@"song_id"]){
        self.song_id = [NSString stringWithFormat:@"%@", value];
    }else{
        [super setValue:value forKey:key];
    }
}
@end
